import React from "react";
import {useLocation,useNavigate} from 'react-router-dom'
import { Button } from "antd";
import qs from 'qs'
function Xiangqing(){
	const location=useLocation()
	// console.log(qs.parse(location.search.slice(1)));
	// console.log(new URLSearchParams(location.search));
	// console.log(searchParams.get(id));
	const navigate=useNavigate()
	const handleBtn=()=>{
		 navigate({pathname:'/mall/detail',search:qs.stringify({id:'123',name:'qwe'})})
	}
	
	return(
		<div>详情页面eqwe
            <Button type="primary" onClick={()=>{handleBtn()}}>按钮</Button>

		</div>
		
	)
}
export default Xiangqing